1. Field of the Invention
The present invention relates to a moving picture processor, a method for processing a moving picture, a computer program product for executing an application for a moving picture processor, capable of correcting the variations of motion vectors.
2. Description of the Related Art
In recent years, the international standardization of picture coding has been rapidly pursued. Picture coding schemes include joint photographic experts group (JPEG) which stands is a still picture coding standard; H.263 and H.264, which are moving picture coding standards for communication media; and moving picture experts group (MPEG) which is moving picture coding standards for storage media. In each coding scheme, a coding algorithm is employed for realizing a bit rate (transmission rate) that serves a purpose thereof. In JPEG, color data is compressed by a scheme based on Huffman coding and discrete cosine transform (DCT).
On the other hand, in moving picture compression technique such as H.263 and MPEG, generally, orthogonal transform such as DCT is used for the spatial reduction of the amount of information as in JPEG, and motion compensation (MC) is used for the temporal reduction of the amount of information. General MC is performed by executing interframe prediction using a motion vector, i.e., compensating the amount of motion between a current picture and a reference picture.
Further, at the time of the detection of a motion vector, in a search area set in the reference picture, block matching is performed which detects a block that gives a minimum for an evaluation function such as the sum of absolute differences (SAD) from a target block of the current picture. The motion vector refers to a vector indicating the horizontal and vertical relative positions between a target block of the current picture for which motion is to be detected and a block of the reference picture that is most similar to the target block.
On the other hand, in the case where consecutive blocks equally move by translation or the like, the respective motion vectors of the consecutive blocks are equal. However, variations occur in motion vectors for the following reasons (1) to (3) and the like:    (1) In block matching, motion vectors are detected based on only the result of an operation using an evaluation function. Accordingly, in the case where errors such as white noise are included in pictures, variations occur in the detected motion vectors.    (2) Generally, the amount of motion of a substance in a picture is not an integer multiple of a pixel. Accordingly, in the case of processing in units of macroblocks, the amount of motion of each macroblock is approximated to an integer multiple of one pixel, a half pixel, a quarter pixel, or the like. As a result, variations due to approximation occur in the motion vectors.    (3) If block matching is used in the case where a picture has a flat figure, the case where a pattern is repeated, or the like, a similar different portion is apt to be matched. Similarly, in the case where a similar pattern accidentally exists in another portion, there is a possibility that the another portion may be matched.
Therefore, a technique has been known in which a post-filter for smoothing motion vectors is connected to the output of a motion vector calculator in order to correct variations in motion vectors. However, because of the use of the post-filter, there is a possibility that information on original motion may be lost in the case where a region in which motion changes abruptly exists in a picture, the case where a moving object is small, or the like. As related art for maintaining information on original motion, a technique has been proposed in which characteristics of a post-filter are switched based on the state of distribution of motion vectors.
On the other hand, when consecutive motion vectors are identical, the amount of code relating to motion vectors cant be reduced. However, in the above-described related art, slight variations prevent the amount of code relating to motion vectors from being reduced. In particular, in the case of a high compression rate, the amount of code relating to motion vectors becomes dominant in the total amount of code, and compression efficiency is decreased. Further, there also arise problems such as the one that block noise is tends to be pronounced when motion vectors differ between adjacent macroblocks.